from selenium import webdriver
import time
browser = webdriver.Chrome('E:\浏览器插件（chrome）/chromedriver.exe')
browser.get('https://www.baidu.com')
time.sleep(1)
# 搜索id为kw的输入火车
browser.find_element_by_id('kw').send_keys('火车')
# 搜索id为su的按钮点击
browser.find_element_by_id('su').click()
# 延迟2秒，让数据加载
time.sleep(2)
browser.close()
